package com.fortune.dao;

import com.fortune.dto.in.dCRelation.DCRelationListDto;
import com.fortune.vo.dCRelation.DCRelationInfo;
import com.fortune.vo.dCRelation.DCRelationList;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DCRelationDao {
    /**
     * 查询经销商与客户列表
     * @param dealerId
     * @param dcRelationListDto
     * @return
     */
    List<DCRelationList> queryDelareClientList(@Param("dealerId") String dealerId, @Param("dcRelationListDto") DCRelationListDto dcRelationListDto);

    /**
     * 查询经销商与客户列表个数
     * @param dealerId
     * @param dcRelationListDto
     * @return
     */
    int queryDelareClientListCount(@Param("dealerId") String dealerId, @Param("dcRelationListDto") DCRelationListDto dcRelationListDto);

    /**
     * 查询客户详情
     * @param phone
     * @return
     */
    DCRelationInfo queryClientInfo(String phone);

    /**
     * 查询经销商与客户关系是否存在
     * @param dealerId
     * @param id
     * @return
     */
    int queryRelationIsExist(@Param("dealerId") String dealerId, @Param("id") String id);

    /**
     * 添加经销商与客户关系
     * @param dealerId
     * @param id
     * @return
     */
    int addRelationIs(@Param("dealerId") String dealerId, @Param("id") String id);

    /**
     * 删除客户
     * @param dealerId
     * @param id
     * @return
     */
    int delete(@Param("dealerId") String dealerId, @Param("id") String id);
}
